package com.example.smartgreenhouse.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.smartgreenhouse.entity.DeviceCurrent;
import org.apache.ibatis.annotations.Update;

public interface DeviceCurrentMapper extends BaseMapper<DeviceCurrent> {
    
    @Update("UPDATE device_current SET " +
            "current_level = #{currentLevel}, " +
            "is_auto = #{isAuto} " +
            "WHERE device_type = #{deviceType} AND device_id = #{deviceId}")
    int updateDeviceStatus(DeviceCurrent entity);
}